package com.school.aftersalemanagement.callback.impl;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

import com.school.aftersalemanagement.callback.StringCallback;
import com.school.aftersalemanagement.entity.Result;
import com.school.aftersalemanagement.global.BaseActivity;
import com.zhy.http.okhttp.request.RequestCall;

/**
 * Created by winkyle on 2017/11/8.
 */

public class ResultCallback extends StringCallback {

    public ResultCallback(RequestCall requestCall, Handler handler, int messageType, Context context, boolean cycle) {
        super(requestCall, handler, messageType, context, cycle);
    }

    @Override
    public void onResponse(String response, int id) {
        Log.d(requestCall.getClass().getSimpleName()+"response", response);
        Result result = getResult(response);
        showShort(result.getMsg());
    }
}
